package com.lw.question05.task_3;

/**
 * @author LW
 * @2020/9/15 16:35
 */
public class task3 {
    public static void main(String[] args) {
        Triangle triangle = new Triangle();
        Rectangle rectangle = new Rectangle();
        Circle circle = new Circle();
        Shape[] s = {triangle,rectangle,circle};
        for (int i = 0; i < s.length; i++) {
            System.out.println(s[i].calArea(1,2));
        }
    }
}
